package com.leigq.www.mybatisplusstudy.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 性别枚举
 * <br/>
 * {@link @JsonFormat}注解序列化为json对象
 * @author leiguoqing
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@Getter
@AllArgsConstructor
public enum GenderEnum implements IEnum<Integer> {

    /**
     * 男
     */
    MALE(1, "男"),

    /**
     * 女
     */
    FEMALE(2, "女"),


    /**
     * 未知
     */
    UNKNOWN(3, "未知"),


    ;

    @EnumValue
    private final Integer value;



    private final String description;
}
